/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aiaudio.database.tablegroup;

import aiaudio.lastfm.hbase.CannotCreateTableException;
import aiaudio.database.DatabaseStorage;
import aiaudio.database.tables.TableStructure;
import java.io.IOException;

/**
 *
 * @author nastya
 */
public class PrepareRatingsAlgTableGroup extends TableGroup {

    private String inversedRatingMatrix = "inversed_matrix";
    private String normilizedRatingMatrix = "normilized_matrix";

    public PrepareRatingsAlgTableGroup(String key, boolean dropIfExists) {
        super(key, dropIfExists);
    }

    public void setInversedRatingMatrix(String inversedRatingMatrix) {
        this.inversedRatingMatrix = inversedRatingMatrix;
    }

    public void setNormilizedRatingMatrix(String normilizedRatingMatrix) {
        this.normilizedRatingMatrix = normilizedRatingMatrix;
    }

    public String getInversedRatingMatrix() {
        return addKey(inversedRatingMatrix);
    }

    public String getNormilizedRatingMatrix() {
        return addKey(normilizedRatingMatrix);
    }

    @Override
    public void create(DatabaseStorage storage) throws CannotCreateTableException, IOException {
        createTable(storage, getInversedRatingMatrix(), TableStructure.RatingMatrix);
        createTable(storage, getNormilizedRatingMatrix(), TableStructure.RatingMatrix);
    }
}
